home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // BitmapDemo.h
- //
- //***********************************************************************
-
- class CMyApp : public CWinApp
- {
- public:
- virtual BOOL InitInstance ();
- };
-
- class CMaskedBitmap : public CBitmap
- {
- public:
- virtual void Draw (CDC*, int, int);
- virtual void DrawTransparent (CDC*, int, int, COLORREF);
- };
-
- class CMainWindow : public CFrameWnd
- {
- private:
- BOOL m_bDrawOpaque;
- CPalette m_palette;
- CMaskedBitmap m_bitmap;
-
- void DoGradientFill (CDC*, CRect*);
-
- public:
- CMainWindow ();
-
- protected:
- afx_msg int OnCreate (LPCREATESTRUCT);
- afx_msg BOOL OnEraseBkgnd (CDC*);
- afx_msg void OnPaint ();
- afx_msg BOOL OnQueryNewPalette ();
- afx_msg void OnPaletteChanged (CWnd*);
- afx_msg void OnOptionsDrawOpaque ();
- afx_msg void OnOptionsDrawTransparent ();
- afx_msg void OnOptionsExit ();
- afx_msg void OnUpdateDrawOpaqueUI (CCmdUI*);
- afx_msg void OnUpdateDrawTransparentUI (CCmdUI*);
-
- DECLARE_MESSAGE_MAP ()
- };
-